<div class="content">
	<form class="form-horizontal" name="runnerForm" ng-submit="vm.submitForm(runnerForm.$valid)" novalidate>
		<div class="ibox">
            <div class="ibox-title">
                <h5>选手信息</h5>
            </div>
            <div class="ibox-content">
                <div class="form-group">
                    <label class="col-lg-3 control-label">科目 <b class="text-danger">*</b></label>
                    <div class="col-lg-3">
                        <select name="runnerCourse" class="form-control" ng-model="vm.runner.runner_course" ng-options="item.course_name for item in vm.courselist" required>  
                            <option value="">请选择科目</option>  
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">选手号 <b class="text-danger">*</b></label>
                    <div class="col-lg-3">
                        <input type="text" name="runnerNum" class="form-control" placeholder="请输入选手号" ng-model="vm.runner.runner_num" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">选手姓名 <b class="text-danger">*</b></label>
                    <div class="col-lg-3">
                        <input type="text" name="runnerName" class="form-control" placeholder="请输入选手姓名" ng-model="vm.runner.runner_name" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">性别</label>
                    <div class="col-lg-3">
                        <label class="radio">
                            <input icheck type="radio" name="runnerGender" value="male" ng-model="vm.runner.runner_gender"> 男
                        </label>
                        <label class="radio">
                            <input icheck type="radio" name="runnerGender" value="female" ng-model="vm.runner.runner_gender"> 女
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">团队</label>
                    <div class="col-lg-3">
                        <select name="team" class="form-control" ng-model="vm.runner.team" ng-options="item.team_name for item in vm.teamlist">  
                            <option value="">请选择团队</option>  
                        </select>
                    </div>
                </div>
                <div class="form-group" ng-if="vm.runner.runner_course&&vm.teamlist.length==0">
                    <div class="col-lg-offset-3 col-lg-6">
                        <p class="help-block text-danger">该科目下暂无团队信息。<a ui-sref="dashboard.race.team" style="text-decoration: underline;">点击这里</a> 新建团队。</p>
                    </div>
                </div>
                <div class="form-group">
                	<label class="col-lg-3 control-label">手机号码</label>
                    <div class="col-lg-3">
                    	<input type="text" name="runnerPhone" class="form-control" placeholder="请输入手机号码" ng-model="vm.runner.runner_phone">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">身份证</label>
                    <div class="col-lg-3">
                        <input type="text" name="runnerIdentity" class="form-control" placeholder="请输入身份证" ng-model="vm.runner.runner_identity">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">邮箱</label>
                    <div class="col-lg-3">
                        <input type="text" name="runnerEmail" class="form-control" placeholder="请输入邮箱" ng-model="vm.runner.runner_email">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">地址</label>
                    <div class="col-lg-3">
                        <input type="text" name="runnerAddress" class="form-control" placeholder="请输入地址" ng-model="vm.runner.runner_address">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-lg-offset-3 col-lg-3">
                        <button type="button" class="btn btn-sm btn-default" ui-sref="dashboard.race.runnerlist"><i class="fa fa-times"></i>取消</button>
                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-save"></i>保存</button>
                        <button type="button" class="btn btn-sm btn-danger" ng-click="vm.deleteItems($state.params.runner_id)" ng-if="$state.params.runner_id"><i class="fa fa-trash-o"></i>删除</button>
                    </div>
                </div>
            </div>
        </div>
	</form>
</div>